import httpInstance from '@/utils/http.js';

export function loginAPI({ account, password }) {

  return httpInstance({
    url: '/login',
    method: 'POST',
    data: {
      account,
      password
    },
  })
  // return httpInstance.post("/login",{username,password});
}

export const getLikeListAPI = ({ limit = 4 }) => {
  return httpInstance({
    url: '/goods/relevant',
    params: {
      limit
    }
  })
}

export const testCorsAPI1 = () => {
  return httpInstance({
    url: '/employee/login',
    method: 'post',
    // data: {
    //   phone: '18290234649',
    //   code: '1234'
    // }
    // data: {
    //   username: 'admin',
    //   password: '123456'
    // }
  })
}

export const testCorsAPI2 = () => {
  return httpInstance({
    url: '/employee/page',
    method: 'get',
    params: {
      page: 1,
      pageSize: 3
    }
  })
}

export const testCorsAPI3 = () => {
  return httpInstance({
    url: '/employee/logout',
    method: 'post'
  })
}